import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { LearningResources } from 'libs/db/entity/learning-resources.entity';
import { LearningResourcesController } from './learning-resources.controller';
import { LearningResourcesService } from './learning-resources.service';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([LearningResources])
    ],
    controllers: [
        LearningResourcesController
    ],
    providers: [
        LearningResourcesService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class LearningResourcesModule { }
